/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * CadastrarMotorista.java
 *
 * Created on 02/08/2011, 21:40:47
 */

package View.Comprovante;

import Controle.Controlador;
import Controle.Uteis;
import Formulario.DadosFormulario;
import Formulario.Formulario;
import Modelo.Cliente_has_Seguro;
import Modelo.Comprovante;
import View.Fundo2;
import View.Iniciar;
import View.TelaMetodos;
import java.awt.BorderLayout;
import java.awt.KeyboardFocusManager;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Observable;
import java.util.Observer;
import java.util.Set;
import javax.swing.JOptionPane;
import javax.swing.KeyStroke;
import javax.swing.SwingUtilities;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author Fernando
 */
public class CadastrarComprovante extends javax.swing.JFrame{
public static Fundo2 pnlFundo = new Fundo2();

//Variavel de controle da thread do processo
    private Thread processo;


    /** Creates new form CadastrarMotorista */
    public CadastrarComprovante() {
        initComponents();

        this.pack();

        this.setLayout(new BorderLayout());
        this.add(pnlFundo, BorderLayout.CENTER);
        this.setExtendedState(MAXIMIZED_BOTH);
        TextArea();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        buttonGroup2 = new javax.swing.ButtonGroup();
        jLabel22 = new javax.swing.JLabel();
        jButton3 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jPanel1 = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        tabelaSeguro = new javax.swing.JTable();
        strc = new javax.swing.JRadioButton();
        valor = new javax.swing.JRadioButton();
        jButton4 = new javax.swing.JButton();
        chave = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        Remetente = new javax.swing.JRadioButton();
        Destinatario = new javax.swing.JRadioButton();
        Cliente = new javax.swing.JRadioButton();
        jPanel2 = new javax.swing.JPanel();
        data = new javax.swing.JFormattedTextField();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        segurado = new javax.swing.JComboBox();
        jLabel3 = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        info = new javax.swing.JTextArea();
        jLabel5 = new javax.swing.JLabel();
        label = new javax.swing.JLabel();
        barradeprogresso = new javax.swing.JProgressBar();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Cadastrar conta");

        jLabel22.setBackground(new java.awt.Color(204, 0, 0));
        jLabel22.setFont(new java.awt.Font("Tahoma", 0, 18));
        jLabel22.setForeground(new java.awt.Color(204, 0, 0));
        jLabel22.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icones/arquivo (2).png"))); // NOI18N
        jLabel22.setText("Cadastrar comprovante");

        jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icones/voltar.png"))); // NOI18N
        jButton3.setText("Voltar");
        jButton3.setOpaque(false);
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });

        jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icones/cadastrar.png"))); // NOI18N
        jButton2.setText("Cadastrar");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        jPanel1.setBackground(new java.awt.Color(255, 255, 255));
        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Escolher seguro", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 14), new java.awt.Color(204, 0, 0))); // NOI18N

        tabelaSeguro.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {},
                {},
                {},
                {}
            },
            new String [] {

            }
        ));
        tabelaSeguro.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tabelaSeguroMouseClicked(evt);
            }
        });
        tabelaSeguro.addAncestorListener(new javax.swing.event.AncestorListener() {
            public void ancestorMoved(javax.swing.event.AncestorEvent evt) {
            }
            public void ancestorAdded(javax.swing.event.AncestorEvent evt) {
                tabelaSeguroAncestorAdded(evt);
            }
            public void ancestorRemoved(javax.swing.event.AncestorEvent evt) {
            }
        });
        jScrollPane2.setViewportView(tabelaSeguro);

        strc.setBackground(new java.awt.Color(255, 255, 255));
        buttonGroup1.add(strc);
        strc.setText("STRC");

        valor.setBackground(new java.awt.Color(255, 255, 255));
        buttonGroup1.add(valor);
        valor.setText("valor Fatura");

        jButton4.setText("Buscar");
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });

        jLabel4.setText("Pesquisar:");

        Remetente.setBackground(new java.awt.Color(255, 255, 255));
        buttonGroup1.add(Remetente);
        Remetente.setText("Remetente");

        Destinatario.setBackground(new java.awt.Color(255, 255, 255));
        buttonGroup1.add(Destinatario);
        Destinatario.setText("Destinatario");

        Cliente.setBackground(new java.awt.Color(255, 255, 255));
        buttonGroup1.add(Cliente);
        Cliente.setText("Cliente");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(37, 37, 37)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(chave, javax.swing.GroupLayout.PREFERRED_SIZE, 211, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(49, 49, 49)
                        .addComponent(jButton4))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(strc)
                        .addGap(18, 18, 18)
                        .addComponent(valor)
                        .addGap(26, 26, 26)
                        .addComponent(Remetente)
                        .addGap(18, 18, 18)
                        .addComponent(Destinatario)
                        .addGap(18, 18, 18)
                        .addComponent(Cliente))
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 666, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(59, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(15, 15, 15)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(strc)
                    .addComponent(valor)
                    .addComponent(Remetente)
                    .addComponent(Destinatario)
                    .addComponent(Cliente))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(chave, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton4))
                .addGap(18, 18, 18)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(22, Short.MAX_VALUE))
        );

        jPanel2.setBackground(new java.awt.Color(255, 255, 255));
        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Detalhes do comprovante", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 14), new java.awt.Color(204, 0, 0))); // NOI18N
        jPanel2.setPreferredSize(new java.awt.Dimension(760, 270));

        data.setFormatterFactory((new javax.swing.text.DefaultFormatterFactory(Uteis.Mascara("##/##/####"))));

        jLabel1.setText("Data:");

        jLabel2.setText("Segurado:");

        jLabel3.setText("Informações complementares:");

        info.setColumns(20);
        info.setRows(5);
        jScrollPane1.setViewportView(info);

        jLabel5.setText("Gerando Comprovante:");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel3)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel2Layout.createSequentialGroup()
                                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel1)
                                    .addGroup(jPanel2Layout.createSequentialGroup()
                                        .addGap(10, 10, 10)
                                        .addComponent(data, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                .addGap(60, 60, 60)
                                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel2)
                                    .addGroup(jPanel2Layout.createSequentialGroup()
                                        .addGap(10, 10, 10)
                                        .addComponent(segurado, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(37, 37, 37)
                                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(label, javax.swing.GroupLayout.PREFERRED_SIZE, 217, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGroup(jPanel2Layout.createSequentialGroup()
                                                .addComponent(jLabel5)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                .addComponent(barradeprogresso, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))))
                        .addGap(71, 71, 71)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(jLabel2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(barradeprogresso, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(data, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(segurado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel5)))
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGap(23, 23, 23)
                        .addComponent(jLabel3))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addComponent(label, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(18, 18, 18)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel22)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 774, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(34, 34, 34)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, 133, Short.MAX_VALUE))))
                .addContainerGap(47, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel22)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jButton2)
                        .addGap(90, 90, 90)
                        .addComponent(jButton3))
                    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(38, 38, 38))
        );

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-1024)/2, (screenSize.height-760)/2, 1024, 760);
    }// </editor-fold>//GEN-END:initComponents

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        TelaMetodos.Dispose(this);
    }//GEN-LAST:event_jButton3ActionPerformed

    private void tabelaSeguroAncestorAdded(javax.swing.event.AncestorEvent evt) {//GEN-FIRST:event_tabelaSeguroAncestorAdded
        
        tabelaSeguro.setModel(tabela);

        tabelaSeguro.setModel(tabela);
        tabela.addColumn("STRC");
        tabela.addColumn("REMETENTE");
        tabela.addColumn("DESTINATARIO");
        tabela.addColumn("MERCADORIA");
        tabela.addColumn("PLACA DO VEICULO");
        tabela.addColumn("FATURA");
        tabela.addColumn("VALOR TOTAL");
        tabela.addColumn("VALOR DA FATURA");
}//GEN-LAST:event_tabelaSeguroAncestorAdded

    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
       cli.clear();
       TelaMetodos.RemoveDadosTabela(tabela, tabelaSeguro);
        cli.addAll(Controlador.buscarSeguros(chave.getText(), selecao()));
       if(cli !=null){
             for(Cliente_has_Seguro c:cli){
                TelaMetodos.colocarDados(tabela,c.getCli(),c.getSeg(),c.getValorFatura(),tabelaSeguro.getColumnCount());
           }
        }


    }//GEN-LAST:event_jButton4ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        if(tabelaSeguro.getSelectedRow()!=-1){
           Comprovante comp =  Controlador.cadastroComprovante(cli.get(tabelaSeguro.getSelectedRow()),data.getText(),info.getText(),segurado.getItemAt(segurado.getSelectedIndex()).toString());
           DadosFormulario f = new DadosFormulario();
           f.preencherComDados(comp, Controlador.getEmp());
           if(processo !=null && processo.getState()== processo.getState().TERMINATED)
               processo = null;
           executaProcesso(f);
           
        }else
            JOptionPane.showMessageDialog(null, "Selecione um seguro");
    }//GEN-LAST:event_jButton2ActionPerformed

    

    private void tabelaSeguroMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tabelaSeguroMouseClicked
         if(tabelaSeguro.getSelectedRow()!=-1){
            segurado.removeAllItems();
            String []dados ={cli.get(tabelaSeguro.getSelectedRow()).getSeg().getRem().getCli().getNomeFaturante(),cli.get(tabelaSeguro.getSelectedRow()).getSeg().getDest().getCli().getNomeFaturante(),cli.get(tabelaSeguro.getSelectedRow()).getCli().getNomeFaturante()};
            for(String d:dados)
                segurado.addItem(d.toUpperCase());
         }else
             JOptionPane.showMessageDialog(null, "Escolha um seguro");

    }//GEN-LAST:event_tabelaSeguroMouseClicked

    
    public int selecao(){
        if(strc.isSelected())
            return 1;
        else if(valor.isSelected())
            return 2;
        else if(Remetente.isSelected())
            return 3;
        else if(Destinatario.isSelected())
            return 4;
        else if(Cliente.isSelected())
            return 5;
        return 1;
    }

    public void TextArea(){
        //Criando o set para o método setFocusTraversalKeys() - tab
          Set tab = new HashSet (1);

          //Modificando o KeyStroke para avançar
          tab.add(KeyStroke.getKeyStroke("TAB"));

          //Criando o set para o método setFocusTraversalKeys() - shifttab
          Set shifttab = new HashSet (1);

          //Modificando o KeyStroke para retroceder
          shifttab.add(KeyStroke.getKeyStroke("shift TAB"));

          //Modificando as propriedades de foco do componente textArea
          info.setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS,tab);
          info.setFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS,shifttab);
    }
    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new CadastrarComprovante().setVisible(true);
            }
        });
    }
   DefaultTableModel tabela = new DefaultTableModel();
   private ArrayList <Cliente_has_Seguro> cli = new ArrayList <Cliente_has_Seguro>();
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JRadioButton Cliente;
    private javax.swing.JRadioButton Destinatario;
    private javax.swing.JRadioButton Remetente;
    private javax.swing.JProgressBar barradeprogresso;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.ButtonGroup buttonGroup2;
    private javax.swing.JTextField chave;
    private javax.swing.JFormattedTextField data;
    private javax.swing.JTextArea info;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JLabel label;
    private javax.swing.JComboBox segurado;
    private javax.swing.JRadioButton strc;
    private javax.swing.JTable tabelaSeguro;
    private javax.swing.JRadioButton valor;
    // End of variables declaration//GEN-END:variables




   /**
     * Executa o processo da aplicação
     */
    private void executaProcesso(DadosFormulario f) {
        if(processo==null) { //Instancia a thread SE não existir uma
            processo = new Thread(new Formulario(f,barradeprogresso,label,1));
            processo.start();
            
        } else {
            label.setText("O processo ainda está em execução");
        }
    }
    


}
